package day8;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class InputTest6 {
    public static void main(String[] args) {
        // E:\迅雷下载\cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso
        try {//全部读出
            FileInputStream fin = new FileInputStream("E:\\temp\\java78\\chenyi\\java78.txt");
            System.out.println("可用资源："+fin.available());//1G
            int ch = 0;
            //ch=fin.read   ch!=-1)//读取，判断一气呵成
            while ((ch = fin.read()) != -1) {
                System.out.println(ch + "," + (char) ch);
            }//单字节文本的读取了所有的内容
            fin.close();
        } catch (IOException e) {
            e.printStackTrace();
        }


    }
}
